The invention pertains to machine vision and, more particularly, to methods for locating electronic components with leads.
Machine vision refers to the automated analysis of an image to determine characteristics of objects and other features shown therein. It is often employed in automated manufacturing, where images of components are analyzed to determine placement and alignment prior to assembly.
During the assembly of electronic devices, machine vision is used to determine the position and orientation of leaded components before they are soldered onto printed circuit boards. Analysis of leaded component images is often accomplished in two passes: a first to determine approximate position and orientation; and, a second to determine these more exactly, as well as, where necessary, to inspect the component, e.g., for defects. According to one general practice, at least the first pass is accomplished by scanning the images for edge boundariesxe2x80x94specifically, those corresponding to transitions between the component body and its leads, or between the leads and the image background.
One advanced technique using this practice is described in U.S. Pat. No. 5,805,222, which is owned by the assignee hereof. That patent discloses a method that includes estimating the location of a group of leads, computing the center and angle of a xe2x80x9clead scan searchxe2x80x9d rectangle within which the group of leads is located, scanning that rectangle to locate lead tips and bases, and updating an estimate of the group""s location. These steps are repeated for each group of leads so that their positions can be accurately determined and so that they can be appropriately inspected.
Though overcome by the above-cited patent, complications can arise when inspecting leaded component images for lead/body or lead/background transitions. For example, there is often a wide variation in the intensity of light reflected off the leads. Sometimes the xe2x80x9cfeetxe2x80x9d or tips of the leads are not visible in the image, while at other times they are the only portions present. Still other times, each lead appears as two or more bright reflective xe2x80x9cblobsxe2x80x9d. The complications are exacerbated when the image background contains excessive noise in the area around the leads.
Other prior art techniques for approximating the location of component leads rely heavily on machine vision xe2x80x9csearchxe2x80x9d techniques, i.e., techniques that search image under inspection to find the portion that best matches a template (or model) image. The template for leaded component inspection would typically comprise in image of the entire component.
Search-based techniques for finding leaded components have met with limited success. This is partly due to the large variation in imaging conditions described above. It is also due to the differences between the model image and actual lead set geometries, dimensions, pitch distances, etc., in images under inspection.
An object of this invention is to provide improved methods for machine vision and, more particularly, improved methods for inspection of electronic leaded components.
A further object of the invention is to provide such methods as permit the rapid determination of leaded component position, orientation, pose, and/or scale (hereinafter, unless otherwise evident from context, collectively referred to as xe2x80x9clocationxe2x80x9d).
A related object is to provide such methods as can be used for purposes of approximation of leaded component location or, where appropriate, final determination thereof.
A further object of the invention is to provide such methods as can be implemented in conventional machine vision apparatus, without undue expense or consumption of resources.
The foregoing are among the objects achieved by the invention, which provides in one aspect a machine vision method for locating a leaded electronic device, such as integrated circuit chips, in an image. The method includes searching the image with a template depicting only a portion of each of one or more of the leads expected on the device. A location (i.e., a position, orientation, pose and/or scale) of the device, or its leads, follows from results of the search.
According to one related aspect of the invention, the searched-for templates represent no more than two edges of each of the expected leads. For example, the method can use a pattern that represents the left and right xe2x80x9csidexe2x80x9d edges of each lead, but not its xe2x80x9ctipxe2x80x9d or xe2x80x9cbasexe2x80x9d edges. Such a pattern can be advantageously used with devices having relatively few leads, e.g., ten or fewer leads, five or fewer leads, or, preferably, three or fewer leads. It can otherwise be advantageously used with devices whose leads are substantially spaced from one another, e.g., devices for which (i) the lead pitch is greater than or equal to three times the lead width, and (ii) the number of leads is less than or equal to ten, preferably, less than or equal to five and, still more preferably, less than or equal to three.
According to another related aspect of the invention, the searched-for templates represent no more than one edge of each of the expected leads. For example, the method can use a pattern that represents the left-side edge of each lead, but not its right-side edge, its tip edge or its base edge. Such a pattern can be advantageously used with devices having fifty or fewer leads, thirty or fewer leads, between three and fifty leads, or between three and thirty leads. It can otherwise be advantageously used with devices whose leads are moderately spaced from one another, e.g., devices for which (i) the lead pitch is greater than or equal to three times the lead width, and (ii) the number of leads is less than or equal to fifty, preferably, less than or equal to thirty, still more preferably, between three and fifty, and yet still more preferably, between three and thirty.
By way of a further example, the method can use a template that represents the tip edge of each lead, but not its left or right side edges. Such a pattern can be advantageously used with devices having fifty or more leads or, preferably, one hundred or more leads. More particularly, the method can search for a template depicting the segmented line pattern, for example, effected by plural such tip edges. It can otherwise be advantageously used with devices whose leads are closely spaced to one another, e.g., devices for which the lead pitch is less than three times the lead width.
Methods according to the invention need not use templates depicting the entirety of the selected edges. Thus, for example, the patterns can represent portions at the xe2x80x9cfootxe2x80x9d or contact portion of the leads.
Moreover, the methods need not employ templates that depict all of the expected leads. For example, according to some aspects of the invention, templates are intended to match only end selected device leads, e.g., those at ends of groups of leads.
Yet still other aspects of the invention employ methods as described above in which the templates and/or searching step positively weight portions of the search pattern that match apparent lead at an expected position, yet negatively weight portions that match apparent at unexpected positions.
These and other aspects of the invention are evident in the drawings and in the description that follows.